home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
util
/
pack
/
xpk_Source.lha
/
xpk_Source
/
AboutSources
Wrap
Text File
|
1996-11-29
|
4KB
|
96 lines
A small guide to the sources
IMPORTANT: As long as any of the authors are reachable via mail/e-mail
contact them first, before you make somehow changed/patched versions.
Also the sources of main xpk library are offered, but this doesn't give
you the right to create your own version of xpkmaster.library (it is not
public domain software). Everytime you have to contact either Dirk Stöcker,
Christian von Roques or Urban Dominik Müller. We may give you the OK to
do further development!
----------------------------------------------------------------------------
You should begin your tour to these sources in the examples directory, which
contains some simple examples of how to write applications using xpk.
The directory Shell contains the sources of what I think are the basic shell
utilities for xpk.
If you want to write a sublibrary in C, the best place to start with are
the sources of xpkRLEN.library.
Assembler programmers should take a look at the sources of xpkFAST.library.
I tried to separate the .library bureaucrazy from the other stuff and
generally tried to write elegant and readable code while writing FAST.
People with a hang to monolitic assembler sources or a distaste for linkers
will be pleased by what they'll find in the directory with the sources of
xpkHUFF.library.
xpkmaster contains the cleanedup sources of the xpkmaster.library, but still
is a mess. Do not try to understand the inner workings of xpkmaster.library
without first having read all the documentation. Do not think after reading
the docs you understand them. :-)
The SDI includes are replacements of standard ANSI functions. These includes
mostly reduce the size of the executable, but they are not fully compatible
to the ANSI C ones. You may use them or replace the include line with
<stdlib>, <stdio.h> and <string.h>.
The SDI defines define things I often use (f.e. CTRL_C and the version
string).
About Pragma/Pragmas/Proto: SAS-C uses an directory <proto> to call system
functions (together with <pragmas> directory). Because I use SAS and
Maxon I tried to unify the different calling mechanisms. So I use everytime
the <pragma> directory and define the librarybases in code. If you use
standard SAS includes, you have to change the include lines in the sources.
For those, who want to code their own sublibrary:
--------------------------------------------------
How has the version string to look?
--> see how the standard or the example libraries handle this:
xpk<name of library> <version>.<revision> (<date>) <comments>\r\n\0
example: "xpkFAST 1.7 (07.09.96)\r\n\0"
(NOTE: \r = 0x13; \n = 0x10)
You do not need to add a "$VER: " somewhere in the text and the library
name should be without ".library"! Also the date-format should be the above
form, because Commodore defined this form as an nearly standard. Please
make the work and include an correct library header, because this makes
updating a lot easier! This means also a correct initialisation of the
corresponding fields in the Resident (RomTag) structure. An example library
header handling this you find in the xpk_Develop archive in the ASM-include
directory. (If you have problems in doing this, contact me! - Dirk Stöcker)
How to compile the libraries with SAS-C:
----------------------------------------
Note: SAS-C assembler may report some errors in the asm files. This seems
to be an bug in this assembler.
xpkmaster.library:
call smake in the directory (You may have to change the assembler line
to your assembler before doing this!)
copy the library to LIBS:
other libraries:
run the assembler over the needed asm-file to get either the library or
an object file for the C-Compiler
if there is a SCOPTIONS file:
run sc without options in the directory of the library
copy the library to LIBS:
examples or shell programs
run smake in the directory
How to compile with Maxon C++ V3:
xpkmaster.library:
use the makefile with Maxon's Make
shell programs:
run the compiler over the files (large data mode)
Dirk and Christian.